import {Outlet,NavLink} from 'react-router-dom'
// 根组件 NavLink跳转连接 OutLet子路由的容器
function Root() {
  return ( <div>
    <h1>根组件-路由</h1>
    <NavLink to="/">首页</NavLink> | 
    <NavLink to="/user?from=root">用户1</NavLink> | 
    <NavLink to="/about">关于</NavLink> |
    <NavLink to="/produce/123">产品123</NavLink> |
    <NavLink to="/produce/abc">产品abc</NavLink>
    <NavLink to="/user?from=zql" state={{'done':false,isLog:true}}>用户2</NavLink> |
    <Outlet/>
  </div> );
}

export default Root;